//@ts-ignore
import axios from '../utils/axios';
export default {
  sqlAdmin(params:object):Promise<any>{
    return axios.get('/admin/sql',{ params });
  },
  indexAdmin():Promise<any>{
    return axios.get('/admin/index.html');
  },
  addAdmin(params:object):Promise<any>{
    return axios.post('/admin', params);
  },
  delAdmin(id:number):Promise<any>{
    return axios.delete('/admin/'+id);
  },
  infoAdmin(id:number):Promise<any>{
    return axios.get('/admin/'+id);
  },
  fixAdmin(id:number, params:object):Promise<any>{
    return axios.put('/admin/'+id, params);
  },
  pageAdmin(params:object):Promise<any>{
    return axios.get('/admin',{ params });
  }
}